{template 'common/header'}
<ul class="nav nav-tabs" id="myTab">
	<li class="active"><a href="{php echo $this->createWebUrl('index',array('doo'=>'begging','op'=>'manage'));}">打赏列表</a></li>
	<li><a href="{php echo $this->createWebUrl('index',array('doo'=>'begging','op'=>'list'));}">打赏帖子列表</a></li>
	<li><a href="{php echo $this->createWebUrl('index',array('doo'=>'begging','op'=>'post'));}">添加打赏帖子</a></li>
</ul>
<div class="main">
<!-- <div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
			<input type="hidden" name="m" value="meepo_bbs" />
			<input type="hidden" name="do" value="index" />
			<input type="hidden" name="doo" value="begging" />
			<input type="hidden" name="op" value="manage" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">被打赏昵称</label>
				<div class="col-sm-8 col-lg-9 col-xs-12">
					<input class="form-control" name="bnickname" id="" type="text" value="{$_GPC['bnickname']}" placeholder="被打赏者昵称">
				</div>
			</div> 
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">打赏昵称</label>
				<div class="col-sm-8 col-lg-9 col-xs-12">
					<input class="form-control" name="nickname" id="" type="text" value="{$_GPC['nickname']}" placeholder="打赏者昵称">
				</div>
			</div> 
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">帖子</label>
				<div class="col-sm-8 col-lg-9 col-xs-12">
					<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="帖子标题关键字">
				</div>
			</div> 
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
				<div class="col-sm-8 col-lg-9 col-xs-12">
					<input class="btn btn-primary" id="" type="submit" value="搜索">
				</div>
			</div> 
		</form>
	</div>
	</div> -->
<form action="" method="post" class="form-horizontal" role="form" ng-controller="formCtrl" id="form2">
	<div class="panel panel-default">
		<div class="panel-heading">
			打赏管理
		</div>
		<div class="panel-body table-responsive">
			<table class="table table-hover" style="display:auto;">
				<thead class="navbar-inner">
					<tr>
					   <th style="width:25px;">选？</th>
						<th style="width:160px;">打赏者昵称</th>
						<th style="width:80px;">打赏者头像</th>
						<th style="width:160px;">被打赏者昵称</th>
						<th style="width:80px;">被打赏者头像</th>
						<th style="width:120px;">所属帖子</th>
						<th style="width:100px;">打赏时间</th>
						<th style="width:250px;">打赏留言</th>
						<th style="width:80px;">金额 </th>
						<th style="width:480px;">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in list">
					   <td><input type="checkbox" name="select[]" value="{{item.id}}"></td>
						<td>{{item.nickname}}</td>
						<td><img src="{{item.avatar}}" style="width: 50px;border-radius: 25px;height: 50px;"></td>
						<td>{{item.bnickname}}</td>
						<td><img src="{{item.bavatar}}" style="width: 50px;border-radius: 25px;height: 50px;"></td>
						<td><a href="{{item.href}}">{{item.title}}</a></td>
						<td>{{item.time}}</td>
						<td>{{item.content}}</td>
						<td>{{item.fee}}</td>
						<td >
							<a class="btn btn-default" href="{{item.delete}}">删除</a>
						</td>
					</tr>
				</tbody>
				<tr>
					<td><input type="checkbox" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});"></td>
                    <td colspan="12">
                        <input type="submit" class="btn btn-danger" name="delete" value="删除" />
                    </td>
				</tr>
			</table>
			
		</div>
	</div>
</form>
</div>
{$pager}

<script>
	require(['angular', 'jquery', 'util'], function(angular, $, util){

		var app = angular.module('app', []);
		app.controller('formCtrl', function($scope,$http){
			$scope.list = {php echo json_encode($list)};
			$scope.delete = function (){
				var select = $scope.select;
				alert(select);
			}
			$scope.submit = function() {
	            $('#form2')[0].submit();
	        };
		});

		
		angular.bootstrap(document, ['app']);
	});
</script>
{template 'common/footer'}